#ifndef _DSTACK_
#define _DSTACK_

#define SIZE 10

typedef int element_t;

typedef struct dstack *stack;	/*the opaque pointer*/

typedef enum boolean{false=0,true} bool;

typedef enum selection {left_stack=0,right_stack} sel;



stack create(void);
/*this fuction creates and returns a struct dstack pointer to the client to manage the dstack*/
/*in case of failure returns NULL*/

bool empty(stack target_stack,sel stack_selection);
/*this fuction takes as parameter a struct d stack pointer and checks if the dstack is empty*/
/*if the dstack is empty returns true, else returns false*/

bool full(stack target_stack);
/*this fuction takes as parameter a struct dstack pointer and checks if the dstack is full*/
/*if the dstack is full returns true, else returns false*/

bool pop(stack target_stack,element_t *data,sel stack_selection);
/*this fuction takes as parameters a struct dstack pinter,an element_t data and a stack_selection variable
and pops the top element from the right/left (depends from the stack_selection) stack*/
/*in acse of failure it returns false, else returns true*/


bool push(stack target_stack,element_t data,sel stack_selection);
/*this fuction takes as parameters a struct dstack pointer, an element_t data and a stack_selection
 and pushes the data in the right/left (depends from the stack_selection) stack*/
/*in case of failure returns false, else returns true*/

bool top(stack target_stack,sel stack_selection,element_t *data);
/*this fuction return the top left/right(depends on the stack_selection)*/
/*if the stack is empty returns false, else returns true*/


#endif
